package p.ithorns.framework.common.jvmti;

import com.sun.jna.Library;
import com.sun.jna.Native;

public class JNACommonManager {
    /**
     * 继承Library，用于加载库文件
     *
     * //调用方法Clibrary.INSTANTCE.lzo1x_999_compress();
     */

    public interface Clibrary extends Library {

        final static String LIBRARY_PATH = "D:\\JavaExample\\springboot-integration\\crypto\\src\\main\\resources\\CodeEncryptor.dll"; //"D:/JavaProject/ce-iot/libs/lzo2";

        //加载libhello.so链接库
        Clibrary INSTANTCE = (Clibrary) Native.loadLibrary(LIBRARY_PATH, Clibrary.class); //(Platform.isWindows() ? LIBRARY_PATH + "lzo2" : "liblzo2")

        //此方法为链接库中的方法
        byte[] encrypt(byte[] text);
    }


}
